# -*- coding:utf-8 -*-
from __future__ import absolute_import

from datetime import datetime

from sqlalchemy.orm import relationship, backref
from sqlalchemy.ext.declarative import declarative_base, declared_attr
from sqlalchemy import Column, ForeignKey, Integer, String, Date, DateTime, Float

import sys, os
sys.path.append(os.path.realpath(os.path.join(os.path.dirname(__file__), "../../..")))

from exchange.db.model import *
class account(model_account):


    def get_account_by_username(username):
        return account.one(account.username == username)


if __name__ == '__main__':
    print(account.total())
    print(account.get_account_by_username("abc"))
